﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ExtendMethod
{
     /*
      扩展方法的类，必须是static
      */
    static class ExtendMethods
    {
        /// <summary>
        /// 这个是对int类型的扩展
        /// </summary>
        /// <param name="num1">是当前int变量的值</param>
        /// <param name="num2">这个是参数</param>
        /// <returns></returns>
        public static double Division(this int num1,int num2)
        {
            return (num1 / num2) / 10.0; //随便写的
        }
    }
}
